package entity;

import java.util.function.Supplier;

/**
 * @author ypz
 * @date 2021/9/10 9:58
 */
public class Car {
    private String carName = "hongqi";
    private Integer carNum = 15;
    private String carColor = "红色";

    public String getCarName() {
        System.out.println(carName);
        return carName;
    }

    public void setCarName(String carName) {
        this.carName = carName;
    }

    public Integer getCarNum() {
        System.out.println(carNum);
        return carNum;
    }

    public void setCarNum(Integer carNum) {
        this.carNum = carNum;
    }

    public String getCarColor() {
        System.out.println(carColor);
        return carColor;
    }

    public void setCarColor(String carColor) {
        this.carColor = carColor;
    }
    public static Car create(final Supplier<Car> supplier){
        return supplier.get();
    }

    public static void repair(Car car){
        System.out.println("static car"+car.getCarColor());
    }

    public void getCarNum(Car car) {
    }
}
